﻿
--获取离职员工信息
CREATE proc [dbo].[proc_Employee_Dimission_GetItem]
	@eid int
as
	select
		Id,
		(select ENumber from Employee E where EId=E.Id) as ENumber,
		(select ETempNumber from Employee E where EId=E.Id) as ETempNumber,
		EId,
		(select EName from Employee E where EId=E.Id) as EName,
		(select Sex from Employee E where EId=E.Id) as Sex,
		(select IDCard from Employee E where EId=E.Id) as IDCard,
		(select CompanyName from Company where id=(select companyid from employee E where EId=E.Id)) as CompanyName,
		(select DName from Department where id=(select departmentid from employee E where EId=E.Id)) as DName,
		(select PostName from Post P where id=(select PostId from employee E where EId=E.Id)) as PostName,
		(select Title from Grade G where id=(select GradeId from employee E where EId=E.Id)) as GradeName,
		(select Pluralist from Employee E where EId=E.Id) as Pluralist,
		Reason,
		(SELECT E.EName FROM Employee E WHERE E.UserName=Proposer) as Proposer,
		ApplionTime,
		Audit,
		AuditPerson,
		AuditTime,
		DTemp,
		LizhiDate
	from Employee_Dimission
	where eid=@eid
